package com.fzj.example.design.prototype;

/**
* @Description
* @Author  fanzj
* @Date   2020/5/7 11:18 上午
* @Param
* @Return      
* @Exception   
* 
*/
public class Realizetype implements Cloneable {

    Realizetype(){
        System.out.println("prototype create success!");
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return (Realizetype)super.clone();
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Realizetype realizetype=new Realizetype();
        Realizetype realizetype1= (Realizetype) realizetype.clone();
        System.out.println(realizetype1 == realizetype);

        System.out.println(realizetype.equals(realizetype1));
    }
}
